package com.oa.co.mapper;
/*
 *                                                     __----~~~~~~~~~~~------___
 *                                    .  .   ~~//====......          __--~ ~~
 *                    -.            \_|//     |||\\  ~~~~~~::::... /~
 *                 ___-==_       _-~o~  \/    |||  \\            _/~~-
 *         __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *     _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *   .~       .~       |   \\ -_    /  /-   /   ||      \   /
 *  /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 *  |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *           '         ~-|      /|    |-~\~~       __--~~
 *                       |-~~-_/ |    |   ~\_   _-~            /\
 *                            /  \     \__   \/~                \__
 *                        _--~ _/ | .-~~____--~-/                  ~~==.
 *                       ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                  -_     ~\      ~~---l__i__i__i--~~_/
 *                                  _-~-__   ~)  \--______________--~~
 *                                //.-~~~-~_--~- |-------~~~~~~~~
 *                                       //.-~~~--\
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *                               神兽保佑            永无BUG
 */

import com.oa.co.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author sunXuDong
 * @data 2023/5/3
 */
public interface UserMapper {
    //登录
    User login(String username);
    //注册
    Integer addUser(User user);
    //登陆前修改密码    查询用户操作
    User rPwd(@Param("username") String username,@Param("phone") String phone);
    //登陆前修改密码
    Integer updatePassword(@Param("username")String username,@Param("phone") String phone, @Param("password") String password);
    //修改个人信息
    Integer upInfo(User user);
    //根据主键查询
    @Select("select * from user where id = #{id}")
    User query(Integer id);
    @Select("select * from user where id = #{id} and password = #{password}")
    User queryByPwd(@Param("id") Integer id,@Param("password") String password);

    Integer interiorupdatePassword(@Param("id")Integer id,@Param("password") String passwordIs1);
}
